<template>
  <div class="dashboard-container">
    <!-- <div class="dashboard-text">name: {{ name }}</div> -->
    <!-- 顶部的卡片组件 -->
    <Card></Card>
     <!--中间的销售&访问量的组件 -->
    <Sale></Sale>
    <!-- 底部数据分析的组件 -->
    <FootView></FootView>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import Card from '@/views/dashboard/Card'
import Sale from '@/views/dashboard/Sale'
import FootView from '@/views/dashboard/FootView'

export default {
  name: 'Dashboard',
  components:{
    Card,
    Sale,
    FootView
    },
  data() {
    return {
      
    }
  },
  computed: {
    ...mapGetters([
      'name'
    ])
  },
  mounted(){
       this.$store.dispatch('home/getChartData')
  }
}
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin-top: 10px;
  }
}
</style>
